package com.zyj.myapplication.Service;

import com.zyj.myapplication.Javabean.ShaiTuComment;
import com.zyj.myapplication.Javabean.ShaiTuInfo;
import com.zyj.myapplication.Javabean.Shaitu;

import java.util.List;

import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;


/**
 * Created by Administrator on 2017/10/18.
 */

public interface ShaituService {
    //晒图列表
    @GET("lists/mod/shaitu/related/1")
    Call<List<Shaitu>> getAllshaitu();

    //晒图详情
    @GET("get/mod/shaitu/")
    Call<ShaiTuInfo> getShaiTuInfo(@Query("id") String id,
                                   @Query("related") String related);

    //晒图评论
    @GET("slists/mod/shaireply/related/1/")
    Call<List<ShaiTuComment>> getShaiTuComment(@Query("shaitu_id") String shaitu_id);

    //添加晒图评论
    @GET("create/mod/shaireply/SessionID/2ul9sj8vlfofj122e1s98048k2/")
    Call<Integer> addShaiTuComment(@Query("shaitu_id") String shaitu_id,
                                   @Query("userid") String userid,
                                   @Query("reply_userid") String reply_userid,
                                   @Query("reply") String reply

    );


    //发布晒图
    @Multipart
    @POST("fcreate/mod/shaitu/userid/{userid}/title/{title}")
    Call<ResponseBody> addpost(
            @Path("userid") String uid,
            @Path("title") String title,
            //@Path("club_id") String cid,
            @Part MultipartBody.Part file
    );

}
